package com.ws.shop.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.ws.shop.bean.Page;
import com.ws.shop.dao.PunchDao;
import com.ws.shop.service.PunchService;

@Service(value="punchService")
public class PunchServiceImpl implements PunchService {
	@Resource(name="punchDao")
	private PunchDao punchDao;

	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public Object isPunch(long uid) {
		return punchDao.isPunch(uid);
	}

	@Transactional(rollbackFor=Exception.class)
	public int punching(long uid, String name) {
		return punchDao.punching(uid, name);
	}

	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public Page findPunchListByPage(int pageno, int pagesize, String start,
			String end, String name) {
		return punchDao.findPunchListByPage(pageno,pagesize,start,end,name);
	}

}
